package com.kingdee.eas.hr.emp.handler;

import com.kingdee.shr.base.syssetting.exception.SHRWebException;
import com.kingdee.shr.base.syssetting.web.handler.EditHandler;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.ui.ModelMap;

public class ProbationCulturePlansDetailHandler
  extends EditHandler
{
  private List<Map<String, Object>> getAdjustRecordData(String isMentor)
  {
    List data = new ArrayList();
    Map item = null;
    if ((isMentor == null) || (isMentor.equals("true")))
    {
      item = new HashMap();
      item.put("number", "000");
      item.put("name", "");
      item.put("uipk", 
        "ProbationCulturePlansMentor.form");
      data.add(item);
      
      item = new HashMap();
      item.put("number", "001");
      item.put("name", "");
      item
        .put("uipk", 
        "ProbationCulturePlansEntryMentor");
      data.add(item);
    }
    else
    {
      item = new HashMap();
      item.put("number", "000");
      item.put("name", "");
      item.put("uipk", 
        "com.kingdee.eas.hr.emp.app.ProbationCulturePlans.form");
      data.add(item);
      
      item = new HashMap();
      item.put("number", "001");
      item.put("name", "");
      item
        .put("uipk", 
        "com.kingdee.eas.hr.emp.app.ProbationCulturePlansEntry.form");
      data.add(item);
    }
    return data;
  }
  
  protected void setInitData(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap, Map<String, Object> initData)
    throws SHRWebException
  {
    String personId = request.getParameter("billId");
    String isMentor = request.getParameter("isMentor");
    if ((isMentor == null) || (isMentor.equals("true"))) {
      System.out.println("00000000");
    } else {
      System.out.println("111111111");
    }
    List data = getAdjustRecordData(isMentor);
    initData.put("recordata", data);
    initData.put("personId", personId);
  }
}
